Skip to main content

Feed

GET /

Description

Returns the authenticated user's feed. The backend builds this feed from visible users and their recent posts, respecting privacy, follow relationships, close-friends visibility, and pagination rules.

Request Parameters

Requires Authentication: true

Send a valid bearer token in the Authorization header.

QUERY PARAMS

NameTypeRequiredDescription
pagenumberNoPage number. Defaults to 1.
maxPageSizenumberNoNumber of users returned per page. Maximum is 20.
maxPostsPerUsernumberNoMaximum number of posts included per user in the feed. Maximum is 3.
orderstringNoSorting mode. Use recent or relevant. Default is recent.
datestringNoExact day filter in DD-MM-YYYY format. When present, the feed is narrowed to that local day.
daysnumberNoRolling date window in days when date is not provided. Defaults to 30, max 365.

Usage Example

JavaScript with axios:

const response = await axios.get("https://api.daykeeper.app/", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
params: {
page: 1,
order: "recent",
days: 30,
},
})

Success Response

NameTypeDescription
dataarrayFeed items for the current page
pagenumberCurrent page number
pageSizenumberNumber of results returned in the current page
maxPageSizenumberMaximum number of results allowed per page
totalPagesnumberTotal available pages
totalCountnumberTotal number of records that match the current request

Example

{
"data": [
{
"_id": "6632d8575e64a71b55427a8d",
"username": "Luciano655",
"displayName": "Luciano",
"bio": "my bio here",
"private": false,
"followers": 12,
"following": 8,
"isFollowing": 1,
"posts": [
{
"_id": "6639185cfc7a0435b0b208a6",
"title": "06-05-2024",
"data": "Meu postzinho bacana do dia 06-05",
"created_at": "2024-05-06T17:50:20.071Z"
}
]
}
],
"page": 1,
"pageSize": 1,
"maxPageSize": 20,
"totalPages": 1,
"totalCount": 1
}

Notes

  • The feed endpoint does not use q, type, or following query params.
  • Private users are hidden unless the logged-in user is allowed to see them.
  • Close-friends-only posts are filtered according to the close-friends relationship.
  • If no items match, the API returns data: [] with paging metadata.

Error Response

CodeDescription
401Missing, invalid, or expired token
500Server error

Example

{
"message": "Invalid or expired access token"
}